home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 76 / DVD Actual 1 Marzo 2003.iso / Trial / TurboCAD 7.1 Pro / Data.Cab / F25092_Merge.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-11-10  |  3.0 KB  |  139 lines

  1. // Merge.h: interface for the CMerge class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_MERGE_H__AB417D73_CF7E_11D1_B818_000021452DB6__INCLUDED_)
  6. #define AFX_MERGE_H__AB417D73_CF7E_11D1_B818_000021452DB6__INCLUDED_
  7.  
  8. #if _MSC_VER >= 1000
  9. #pragma once
  10. #endif // _MSC_VER >= 1000
  11.  
  12. class CMapStyles : public CMap<long, long, Style*, Style*>
  13. {
  14. public:
  15.     ~CMapStyles() {CleanAll();};
  16.     void CleanAll();
  17. };
  18.  
  19. class CMapLineStyles : public CMap<long, long, LineStyle*, LineStyle*>
  20. {
  21. public:
  22.     ~CMapLineStyles() {CleanAll();};
  23.     void CleanAll();
  24. };
  25. class CMapBrushStyles : public CMap<long, long, BrushStyle*, BrushStyle*>
  26. {
  27. public:
  28.     ~CMapBrushStyles() {CleanAll();};
  29.     void CleanAll();
  30. };
  31.  
  32. class CMapBlocks : public CMap<long, long, Block*, Block*>
  33. {
  34. public:
  35.     ~CMapBlocks() {CleanAll();};
  36.     void CleanAll();
  37. };
  38.  
  39. class CMapLayers : public CMap<long, long, Layer*, Layer*>
  40. {
  41. public:
  42.     ~CMapLayers() {CleanAll();};
  43.     void CleanAll();
  44. };
  45.  
  46. class CArrBlock : public CArray<Block*, Block*>
  47. {
  48. public:
  49.     ~CArrBlock() {CleanAll();};
  50.     void CleanAll();
  51. };
  52.  
  53. class CArrLayer : public CArray<Layer*, Layer*>
  54. {
  55. public:
  56.     ~CArrLayer() {CleanAll();};
  57.     void CleanAll();
  58. };
  59.  
  60. class CMergeGraphic;
  61. class CMerge  
  62. {
  63. public:
  64.     HRESULT CorrectGraphic(IGraphic *pIGr, BOOL bInsert = TRUE);
  65.  
  66.     void CleanAddedBlocks();
  67.     HRESULT CorrectAddedBlocks();
  68.  
  69.     void CleanAddedLayers();
  70.  
  71.     virtual void CleanAll();
  72.     CMerge();
  73.     virtual ~CMerge();
  74.  
  75.     HRESULT Init(IDrawing *pIDwgSrc, IDrawing *pIDwgTrg, BOOL bSel);
  76.     HRESULT InitA(IDrawing *pIDwgSrc, IDrawing *pIDwgTrg);
  77.  
  78.     HRESULT Run(IGraphic **ppIGrMerge, BOOL bGrsOnly = FALSE);
  79.     HRESULT RunA();
  80.  
  81.     HRESULT StyleMerge(IUnknown *pIUnkStyle);
  82.  
  83.     CMapStyles m_mapStyles;
  84.     CMapLineStyles m_mapLineStyles;
  85.     CMapBrushStyles m_mapBrushStyles;
  86.     CMapBlocks m_mapBlks;
  87.     CMapLayers m_mapLayers;
  88.  
  89.     CArrBlock m_arrBlks;
  90.     CArrLayer m_arrLyrs;
  91. private:
  92.     BOOL m_bSel;
  93.  
  94.     Selection* m_pSelSrc;
  95.     IGraphic * m_pIGrMerge;
  96.     BOOL m_bInit;
  97.  
  98.     IDrawing    *m_pIDwgSrc;
  99.     Styles        *m_pStylesSrc;
  100.     LineStyles    *m_pLineStylesSrc;
  101.     BrushStyles    *m_pBrushStylesSrc;
  102.     Blocks        *m_pBlksSrc;
  103.     Layers        *m_pLayersSrc;
  104.     Graphics    *m_pGrsSrc;
  105.  
  106.     IDrawing    *m_pIDwgTrg;
  107.     Styles        *m_pStylesTrg;
  108.     LineStyles    *m_pLineStylesTrg;
  109.     BrushStyles    *m_pBrushStylesTrg;
  110.     Blocks        *m_pBlksTrg;
  111.     Layers        *m_pLayersTrg;
  112.     Graphics    *m_pGrsTrg;
  113.  
  114.     HRESULT MergeStyles();
  115.     HRESULT MergeStyle(Style *pStSrc);
  116.  
  117.     HRESULT MergeLineStyles();
  118.     HRESULT MergeLineStyle(LineStyle *pLineStSrc);
  119.  
  120.     HRESULT MergeBrushStyles();
  121.     HRESULT MergeBrushStyle(BrushStyle *pBrStSrc);
  122.  
  123.     HRESULT MergeBlock(Block *pBlkSrc, Block** ppBlkTrg);
  124.     HRESULT MergeBlocks();
  125.  
  126.     HRESULT MergeLayer(Layer *pLyrSrc, Layer** ppLyrTrg);
  127.     HRESULT MergeLayers();
  128.  
  129.     HRESULT MergeSelGraphics();
  130.     HRESULT MergeGraphics(Graphics *pGrsSrc, Graphics *pGrsTrg);
  131.  
  132.     DRAWINGGETGRAPHIC m_pfnDwgGetGraphic;
  133.     GRAPHICGETDISPATCH m_pfnGrGetDispatch;
  134.  
  135.     friend class CMergeGraphic;
  136. };
  137.  
  138. #endif // !defined(AFX_MERGE_H__AB417D73_CF7E_11D1_B818_000021452DB6__INCLUDED_)
  139.